package com.binvshe.binvshe.organization.tag;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.binvshe.binvshe.R;
import com.binvshe.binvshe.account.utils.FragmentUtils;
import com.f2prateek.dart.Dart;
import com.f2prateek.dart.InjectExtra;
import com.pachong.android.baseuicomponent.activity.BaseActivity;

import java.util.ArrayList;

/**
 * Created by Zoi.
 * E-mail：KyluZoi@gmail.com
 * 2016/9/20
 */

public class SelectTagActivity extends BaseActivity {
    private static final String KEY_TAGS = "TAGS";

    @InjectExtra(KEY_TAGS)
    ArrayList<TagBean> tags;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        Dart.inject(this);
        getCustomToolbar().setVisibility(View.GONE);
        FragmentUtils.replaceFragment(getSupportFragmentManager(), R.id.corpContainer, SelectTagFragment.newInstance(tags));
    }

    public static void start(Context context, ArrayList<TagBean> tags) {
        Intent starter = new Intent(context, SelectTagActivity.class);
        starter.putExtra(KEY_TAGS,tags);
        context.startActivity(starter);
    }

    @Override
    public View createDataView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        return inflater.inflate(R.layout.act_creat_corp, container);
    }

}
